WDV221 Intro Javascript

Skill Test - Create and Display Javascript Objects

Product Inventory List

EXAMPLE OUTPUT

Number of Products in Product List: 1

Product: Standard Keyboard
Product Number: std-key
Product Wholesale Price: $11.90
Product Suggested Retail Price: $19.87

PROJECT OUTPUT

Number of Products in Product List:

Instructions

  1. Attach the external script file as the source for your data
  2. Using the data provided in the external script file create an array of Product objects called productList. Use the properties/methods defined in the comments to create the Product objects
  3. Display the number of objects in the productList array on the page as indicated
  4. Use a loop to display the contents of the productList on the page in the div element after the PRODUCT OUTPUT heading
  5. The output should follow the same pattern as the example output
  6. All prices should be displayed as USD formatted currency
  7. Convert one of your Product objects into a JSON formatted object. Display the object in the console